<#-- 导入变量定义文件 -->
<#include "../template/include/assign.ftl">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>客户评论中心</title>
<#-- 导入静态资源文件 -->
<#include "../template/include/source.ftl">
<link href="${web_static}/admin/css/list.css" rel="stylesheet" type="text/css" />

<style type="text/css">
	.page{
		float:right;
		padding-top: 15px;
		margin-right: 15px;
	}
</style>
</head>
<#include "../template/template_listPage.ftl">
<script type="text/javascript">
	$().ready( function() {
		<#if actionMessages??&&(actionMessages?size > 0)>
			$.dialog({type: "success", content: "<#list actionMessages as list>${list}<br></#list>",
			 modal: true, autoCloseTime: 5000});
		</#if>
		<#if actionErrors??&&(actionErrors?size > 0)>
			$.dialog({type: "warn", content: "<#list actionErrors as list>${list}<br></#list>",
			 modal: true, autoCloseTime: 3000});
		</#if>
	
		$('.follow-cursor').poshytip({
                    className: 'tip-darkgray',
	                followCursor: true,
	                slide: false
                });
                
	});
 
function deleteComment(id){
	var submit = function (v, h, f) {
                if (v == 'ok')  {
                    var url="${web_base}/go/customer_comment!falseDelete.htm?id="+id;
                    document.forms[0].action=url;
					document.forms[0].submit();
                }  else if (v == 'cancel')  {

                }
                return true; //close
            };
     $.jBox.confirm("你确认要删除吗?", "温罄提示", submit);
 }
 
</script>
</head>
<body class="list">
	<div class="body">
		<div class="listBar">
			<h1><span class="icon">&nbsp;</span>评论管理&nbsp;<span class="pageInfo"></span></h1>
		</div>
		<@pageList page=(page!) id="listForm" action="${web_base}/go/customer_comment!list.htm" query="customerCommentInfoQuery" isEmpty=true>
			<div class="operateBar">
				<label>查找:</label>
				昵称:
				<input type="text" name="customerCommentInfoQuery.customerNick" value="${(customerCommentInfoQuery.customerNick)!}" />
				手机号:
				<input type="text" name="customerCommentInfoQuery.mobile" value="${(customerCommentInfoQuery.mobile)!}" />
				大类:
				<input type="text" name="customerCommentInfoQuery.bigName" value="${(customerCommentInfoQuery.bigName)!}" />
				小类:
				<input type="text" name="customerCommentInfoQuery.smallName" value="${(customerCommentInfoQuery.smallName)!}" />
				<input type="hidden" name="customerCommentInfoQuery.orderBy" id="orderBy" value="${(customerCommentInfoQuery.orderBy)!}" />
				<input type="hidden" name="customerCommentInfoQuery.orderType" id="order" value="${(customerCommentInfoQuery.orderType)!}" />
				<input type="submit" id="searchButton" class="searchButton" value="" />
			</div>
			<table class="listTable">
				<tr>
					<th>
						<span class="" name="id">客户编号</span>
					</th>
					<th>
						<span class="" name="nick">客户昵称</span>
					</th>
					<th>
						<span class="" name="mobile">手机号</span>
					</th>
					<th>
						<span class="" name="big_class">归属大类</span>
					</th>
					<th>
						<span class="" name="small_class">归属小类</span>
					</th>
					<th>
						<span class="sort" name="comment_time">评论时间</span>
					</th>
					<th  width="20%">
						<span class="" name="comment">评论内容</span>
					</th>
					
					<th width="80">操作<th/>
				</tr>
				<#if  page??&&page.list??&&(page.list?size gt 0) >			
				<#list page.list as obj>
					<tr>
						<td>
							${(obj.customerId)!}
						</td>
						<td>
							${(obj.customerNick)!}
						</td>
						<td>
							${(obj.mobile)!}
						</td>
						<td>
							${(obj.bigName)!}
						</td>
						<td>
							${(obj.smallName)!}
						</td>
						<td>
							 <#if obj.commentTime?exists&&obj.commentTime?is_date>
								${(obj.commentTime)?string("yyyy-MM-dd HH:mm:ss")}
							</#if>
						</td>
						<td width="20%">
							<a class="follow-cursor" title="${(obj.commentContent)!}" style="cursor: pointer;">
		                            <#if obj.commentContent??>
		                            <#--//截取输出文字的长度-->
	                                    <#if obj.commentContent?length lte 10 >
	                                   		${(obj.commentContent)!}
	                                    <#else>
	                                    	${obj.commentContent?substring(0,10)}...
	                                    </#if>
		                            </#if>
			                   </a>
						</td>
						<td width="80">
                            <span class="spanLink" onclick="deleteComment('${(obj.id)!}')" title="删除">[删除]</span>
						</td>
					</tr>
					
				</#list>
				<#else>
				    <tr><td colspan="13">
					<div class="noRecord">
						没有找到任何记录!
					</div>	
					</td>
					</tr>
				</#if>	
			</table>
 
		</@pageList>
	</div>
	
</body>
</html>